	<include file='Common:header' />

		<!-- /section:basics/navbar.layout -->
		<div class="main-container" id="main-container">

			<!-- #section:basics/sidebar -->

	<include file='Common:left' />


			<!-- /section:basics/sidebar -->
			<div class="main-content">
				<div class="main-content-inner">
					<div class="page-content">

                        
                        
                        <!--主题-->
						<div class="page-header">
							<h1>
								您当前操作
								<small>
									<i class="ace-icon fa fa-angle-double-right"></i>
									添加左侧导航栏目
								</small>
							</h1>
						</div>

<script>
$(function(){
	$('#navadd').ajaxForm({
		beforeSubmit: checkForm, // 此方法主要是提交前执行的方法，根据需要设置
		success: complete, // 这是提交后的方法
		dataType: 'json'
	});
	
	function checkForm(){
		if( '' == $.trim($('#adminnav_title').val())){
			$('#resone').attr("class", "middle highmsg");//ID为resone 重新class赋值
			$('#resone').html('导航标题不能为空').show();//id为resone 赋值html值
			$('#adminnav_title').focus(); 
			return false;
		}
 
		if( '' == $.trim($('#adminnav_url').val())){
			$('#restwo').attr("class", "middle highmsg");
			$('#resone').html('').show();
			$('#restwo').html('U方法操作名不能为空').show();
			$('#adminnav_url').focus(); 
			return false;
		}
		

 }
	function complete(data){
		if(data.status==1){
			layer.alert('保存成功', {icon: 6}, function(index){
 			layer.close(index);
			window.location.href="{:U('Sys/leftnav')}";
			});
		}else{
			alert(data.info);
			return false;	
		}
	}
 
});
</script>
						<div class="row">
							<div class="col-xs-12">
								<form class="form-horizontal" name="navadd" id="navadd" method="post" action="{:U('runleftnavadd')}">
                                <input type="hidden" name="adminnav_leftid" value="{$adminnav_leftid}" />
                                	<if condition="$adminnav_leftid neq 0">
                                	<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 上级导航名称 </label>
										<div class="col-sm-9">
											<input type="text" readonly placeholder="{$adminnav.adminnav_title}" class="col-xs-10 col-sm-5" />
										</div>
									</div>
                                    <div class="space-4"></div>
                                    </if>
                                    
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 导航标题 </label>
										<div class="col-sm-9">
											<input type="text" name="adminnav_title" id="adminnav_title" placeholder="必填：导航标题" class="col-xs-10 col-sm-5" />
                                            <span class="help-inline col-xs-12 col-sm-7">
												<span class="middle" id="resone"></span>
											</span>
										</div>
									</div>
                                    <div class="space-4"></div>

									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> U方法操作名 </label>
										<div class="col-sm-9">
											<input type="text" name="adminnav_url" id="adminnav_url" placeholder="必填：U方法操作名" class="col-xs-10 col-sm-5" />
                                            <span class="help-inline col-xs-12 col-sm-7">
												<span class="middle" id="restwo"></span>
											</span>
										</div>
									</div>
                                    <div class="space-4"></div>

									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 样式名称 </label>
										<div class="col-sm-9">
											<input type="text" name="adminnav_css" id="adminnav_css" placeholder="样式名称" class="col-xs-10 col-sm-5" />
                                            <span class="help-inline col-xs-12 col-sm-7">
												<span class="middle">只针对顶级栏目有效</span>
											</span>
										</div>
                                            <span class="col-sm-3"></span><span class="col-sm-9" style="font-size:12px; color:#999; margin-top:5px;">预留样式：fa-tachometer ， fa-folder ， fa-list ， fa-list-alt ， fa-calendar</span>
									</div>
                                    <div class="space-4"></div>
                                    
									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 是否开启 </label>
										<div class="col-sm-9" style="padding-top:5px;">
											<input name="adminnav_open" id="adminnav_open" value="1" class="ace ace-switch ace-switch-4 btn-flat" type="checkbox" />
											<span class="lbl"></span>
										</div>
									</div>
                                    <div class="space-4"></div>

									<div class="form-group">
										<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 排序（从小到大） </label>
										<div class="col-sm-9">
											<input type="text" name="adminnav_order" id="adminnav_order" value="50" class="col-xs-10 col-sm-1" />
										</div>
									</div>
                                    <div class="space-4"></div>

									<div class="clearfix form-actions">
										<div class="col-md-offset-3 col-md-9">
											<button class="btn btn-info" type="submit">
												<i class="ace-icon fa fa-check bigger-110"></i>
												保存
											</button>

											&nbsp; &nbsp; &nbsp;
											<button class="btn" type="reset">
												<i class="ace-icon fa fa-undo bigger-110"></i>
												重置
											</button>
										</div>
									</div>
								</form>
                        	</div>
                        </div>
									<div class="hr hr-24"></div>

<include file='Common:header_nav' />

					</div><!-- /.page-content -->
				</div>
			</div><!-- /.main-content -->

	<include file='Common:footer' />
    
		</div><!-- /.main-container -->


	</body>
</html>
